<% title t('medications.index.title') %>
<% page_new new_medication_path %>

<div class="subtitle">
  <%= t('medications.index.subtitle') %>
</div>

<div class="spacer"></div>

<% if @medications.length > 0 %>
  <%= render :partial => '/search/posts', locals: { data_type: 'medication' } %>

  <div id="pages">
    <div class="page">
    <%= render @medications %>
    </div>
  </div>

  <%= paginate @medications %>
<% else %>
<%= raw t('medications.index.instructions', {
    icon: '<i class="fa fa-plus-circle"></i>'
  }) %>

<div class="spacer"></div>

<div id="pages">
  <div class="page">
    <div class="medication no_margin_bottom">
      <h1 class="medication_name"><%= t('medications.index.example_name') %></h1>

      <strong><%= t('medications.strength') %></strong> <%= t('medications.index.example_strength') %>
      <br><strong><%= t('medications.index.total') %></strong> <%= t('medications.index.example_total') %>
      <br><strong><%= t('medications.dosage') %></strong> <%= t('medications.index.example_dosage') %>
      <br><strong><%= t('medications.refill') %></strong> <%= t('medications.index.example_refill') %>
    </div>
  </div>
</div>
<% end %>
